package base.多线程.同步代码.阻塞队列;

import java.lang.reflect.Array;
import java.util.concurrent.ArrayBlockingQueue;

public class Text_1 {
    public static void main(String[] args) {
        /*利用阻塞队列完成消费者和生产者（等待唤醒机制）的代码*/

        ArrayBlockingQueue<String> queue = new ArrayBlockingQueue<>(5);

        Cooker cooker = new Cooker(queue);
        Foodie foodie = new Foodie(queue);

        cooker.start();
        foodie.start();

    }
}
